﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GraphTools
{
    public class WeightedEdge : Edge, IComparable
    {
        public double Weight { get; protected set; }

        public WeightedEdge(int Id, Node node1, Node node2, double Weight)
            : base(Id, node1, node2)
        {
            this.Weight = Weight;
        }

        public WeightedEdge(Node node1, Node node2, double Weight)
            : base(node1, node2)
        {
            this.Weight = Weight;
        }

        public int CompareTo(object obj)
        {
            return this.Weight.CompareTo((obj as WeightedEdge).Weight);
        }
    }
}
